package com.carlinfo.userscenter.common.util;

import java.util.Random;

import com.sun.org.apache.bcel.internal.classfile.ConstantFieldref;

public class RegexUtil
{
	public String randString(int length)
	{
		StringBuffer sb = new StringBuffer();
		Random random = new Random();
		for (int i = 0; i < length; i++)
		{
			int randInt = random.nextInt(ConstatFinalUtil.ALL_STR.length());
			char ch = ConstatFinalUtil.ALL_STR.charAt(randInt);
			sb.append(ch);
		}
		return sb.toString();
	}

	public static void main(String[] args)
	{
		RegexUtil regexUtil = new RegexUtil();
		String rand = regexUtil.randString(6);
		System.out.println("====>" + rand);
	}

}
